import 'package:flutter/material.dart';
import 'package:flutter/services.dart';


class StackLayoutPage extends StatelessWidget {
  final SystemUiOverlayStyle _style = SystemUiOverlayStyle(statusBarColor: Colors.transparent);
  @override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(_style);
    // TODO: implement build
    return MaterialApp(
      home: StackLayoutWidget(),
      theme: ThemeData(primarySwatch: Colors.yellow),
    );
  }
}

class StackLayoutWidget extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _StackLayoutPage();
  }
}

class _StackLayoutPage extends State<StatefulWidget> {

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text("StackLayout Page"),
      ),
      body: SizedBox(
        child: Stack(
          children: <Widget>[
            Positioned(
              left: 15,
              top: 30,
              child: Container(
                width: 100,
                height: 100,
                color: Colors.red,
              ),
            ),
            Positioned(
              right: 15,
              top: 30,
              child: Container(
                width: 50,
                height: 50,
                color: Colors.blue,
              ),
            ),
            Positioned(
              bottom: 30,
              left: 15,
              child: Container(
                width: 100,
                height: 100,
                color: Colors.green,
              ),

            )
          ],
        ),
      ),
    );
  }
}